package com.study.d027shape2d;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.effect.BlendMode;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Line;
import javafx.scene.shape.Rectangle;
import javafx.scene.shape.StrokeLineJoin;
import javafx.scene.shape.StrokeType;
import javafx.stage.Stage;

/** 圆形
*@description
*@author xtayhame
*date 2020年3月21日
*version
*since v1.0
*/
public class CircleMain extends Application{
	public static void main(String[] args) {
		launch(args);
	}
	@Override
	public void start(Stage stage) throws Exception {
		AnchorPane anchorPane = new AnchorPane();
		HBox box = new HBox(10);

		Circle c1 = new Circle(100);
		//设置抗锯齿
		c1.setSmooth(true);
		//设置边框宽度
		c1.setStrokeWidth(2);
		//设置填充
		c1.setFill(Paint.valueOf("#8B4513"));
		//设置边框颜色
		c1.setStroke(Color.BLACK);
		//设置虚线
		c1.getStrokeDashArray().addAll(0.0,5.0,10.0);

		box.getChildren().addAll(c1);
		anchorPane.getChildren().add(box);
		AnchorPane.setTopAnchor(box, 30.0);
		stage.setScene(new Scene(anchorPane, 800, 500));
		stage.show();
	}
}
